package com.wang.java.basic.framework.queue.blockingqueue.blockingdeque;

import java.util.concurrent.LinkedBlockingDeque;

/**
 * 链表阻塞双端队列
 * 数据结构：链表
 * 线程安全：是，基于ReentrantLock实现
 * 队列长度：无界
 * 阻塞性：阻塞
 */
public class LinkedBlockingDequeTest {
    public static void main(String[] args) {
        LinkedBlockingDeque<String> linkedBlockingDeque = new LinkedBlockingDeque<>();
        linkedBlockingDeque.offerLast("a");
        linkedBlockingDeque.offerFirst("b");
        System.out.println(linkedBlockingDeque.pollLast());
        System.out.println(linkedBlockingDeque.pollFirst());
    }
}
